package cn.com.cifi.mars.constant;

public enum CollectTypeEnum {

    CASTDECISION("investment","投资版"),
    WARPLAN("strategy","战规版"),
    GETPRICE("pricing","大定价版"),
    DYNAMIC("dynamic","动态版"),
    ADJUST_BEFORE("adjust_before","调整前"),
    ADJUST_AFTER("adjust_after","调整后"),
    ;
    private String key;
    private String value;

    CollectTypeEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public static String getKeyByValue(String value){
        for(CollectTypeEnum collectTypeEunm:CollectTypeEnum.values()){
            if(value.equals(collectTypeEunm.getValue())){
                return collectTypeEunm.getKey();
            }
        }
        return  null;
    }
    
    public static String getValueByKey(String key){
        for(CollectTypeEnum collectTypeEnum:CollectTypeEnum.values()){
            if(key.equals(collectTypeEnum.getKey())){
                return collectTypeEnum.getValue();
            }
        }
        return  null;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
}
